# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Fabian Bornschein <fabiscafe-cat-mailbox-dog-org>

pkgname=gnome-text-editor
pkgver=44.0
pkgrel=1
pkgdesc="A simple text editor for the GNOME desktop"
url="https://gitlab.gnome.org/GNOME/gnome-text-editor"
arch=(x86_64)
license=(GPL3)
depends=(
  editorconfig-core-c
  enchant
  glib2
  gtksourceview5
  libadwaita
)
makedepends=(
  appstream-glib
  git
  meson
  yelp-tools
)
groups=(gnome)
_commit=2ed7d45ff481f5d0a2cda54e0ec75ce5a823f40e  # tags/44.0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-text-editor.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  local meson_options=(
    -D bugreport_url="https://bugs.archlinux.org/"
  )

  arch-meson $pkgname build "${meson_options[@]}"
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
